/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.platform.dto;



import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 数据传输对象实体类
 *
 * @author BladeX
 * @since 2020-11-05
 */
@Data
public class EquipmentAlarmDTO {


	@ApiModelProperty(value = "告警编号")
	@JsonSerialize(nullsUsing = NullSerializer.class)
	private Integer id;
	/**
	 * 产品编号
	 */
	@ApiModelProperty(value = "告警名称")
	private String alarmName;

	@ApiModelProperty(value = "备名称")
	private String equipmentName;
	/**
	 * 产品编号
	 */
	@ApiModelProperty(value = "设备编号")
	private String equipmentId;
	@ApiModelProperty(value = "告警备注")
	private String remark;
	/**
	 * 触发器
	 */
	@ApiModelProperty(value = "触发条件")
	private List<EquipmentAlarmTriggerDTO> equipmentAlarmTriggerDTOS;
	@NoArgsConstructor
	@Data
	public static class EquipmentAlarmTriggerDTO {
		@ApiModelProperty(value = "执行类型(on,off,attribute)")
		private String executionType;
		@ApiModelProperty(value = "类型")
		private String type;
		@ApiModelProperty(value = "功能物模型ID")
		private String id;



		@ApiModelProperty(value = "属性物模型字段值")
		private List<AttributeFieldDTO> attributeFieldVOListVO;
		@NoArgsConstructor
		@Data
		public static class AttributeFieldDTO {
			@ApiModelProperty(value = "属性物模型ID")
			private String key;
			@ApiModelProperty(value = "属性物模型Name")
			private String name;
			@ApiModelProperty(value = "属性物模型字段条件(大于：dy 小于：xy 等于：ty 不等于：bty 小于等于：xty 大于等于：dty)")
			private String accordWith;
			@ApiModelProperty(value = "属性物模型ID")
			private String value;

			@ApiModelProperty(value = "类型")
			private String type;
			@ApiModelProperty(value = "功能物模型ID")
			private String id;

			@ApiModelProperty(value = "extra")
			private List<Object> extra;

			@ApiModelProperty(value = "paramId")
			private List<Object>  paramId;
		}

	}




}
